package cate.game.role.pay.trademall.forevercontract.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBForeverContract;

@ClientMsg(title = "永久契约领取奖励的请求")
@OperationSetter(GDOperation.FOREVER_CONTRACT_DAILY_REWARD)
public class ForeverContractGotRewardReq implements MsgInput {
    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = cc.getRole().getPay().tradeMall.foreverContract.getReward();
        if(!r.ok()){
            game.notice.message(cc.getRole(), r);
        }
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBForeverContract.GET_REWARD_REQ;
    }
}
